//字符串中第一个唯一字符
 class Solution {
    public int firstUniqChar(String s) {
        int[] array = new int[26];
        for (int i = 0; i < s.length(); i++){
            char ch = s.charAt(i);
            array[ch - 'a']++;
        }
        for (int j = 0; j < 26; j++){
            if (array[j] == 1){
                return j;
            }
        }
        return -1;
    }
}
